package org.timemachine.factory;

import javassist.ClassPool;
import javassist.LoaderClassPath;

public class ClassPoolFactory {
	
	public static ClassPool getDefaultClassPool(ClassLoader classLoader) {
		 ClassPool classPool = ClassPool.getDefault();
         classPool.insertClassPath(getLoaderClassPath(classLoader));
         return classPool;
	}

	private static LoaderClassPath getLoaderClassPath(ClassLoader classLoader) {
		return new javassist.LoaderClassPath(classLoader);
	}

}
